import { _decorator, sys } from "cc";
const { ccclass, property } = _decorator;

@ccclass('PlayerPreference')
export class PlayerPreference {

    static setFloat(key: string, value: number) {
        sys.localStorage.setItem(key, value.toString())
    }

    static getFloat(key: string): number {
        const str = sys.localStorage.getItem(key)
        return Number.parseFloat(str)
    }
}